/PROG  PNS0007
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "V214-5100-5200OK";
PROG_SIZE	= 3356;
CREATE		= DATE 22-07-03  TIME 13:37:40;
MODIFIED	= DATE 25-05-07  TIME 09:10:18;
FILE_NAME	= PNS0049;
VERSION		= 0;
LINE_COUNT	= 118;
MEMORY_SIZE	= 3820;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;

   7:  !  PART:V214-5100-5200  ;
   8:  !2022.7.3************ ;
   9:   ;
  10:  !INITIALIZE ;
  11:  OVERRIDE=20% ;
  12:  MOVE TO HOME    ;
  13:  R[14]=90    ;
  14:  R[18]=1    ;
  15:  R[19]=.2    ;
  16:   ;
  17:  !------------------------------- ;
  18:  !BEGINNING OF PROGRAM ;
  19:  CALL PARTDROP    ;
  20:  COL GUARD ADJUST R[14] ;
  21:  UTOOL_NUM=1 ;
  22:  UFRAME_NUM=0 ;
  23:  PAYLOAD[3] ;
  24:  R[5]=10    ;
  25:  OVERRIDE=R[5] ;
  26:  !INITIATE TO PICK-POUNCE ;
  27:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  28:J P[2:PICK POUNCE] 50% CNT120 ACC100 BREAK    ;
  29:  R[1]=0    ;
  30:  TIMER[1]=RESET ;
  31:  TIMER[1]=START ;
  32:   ;
  33:  LBL[10:TOP OF LOOF] ;
  34:  OVERRIDE=R[5] ;
  35:   ;
  36:  TIMER[3]=STOP ;
  37:  TIMER[2]=STOP ;
  38:  R[1]=R[1]+1    ;
  39:  R[2]=TIMER[2]    ;
  40:  R[3]=60/R[2]    ;
  41:  R[8]=TIMER[3]    ;
  42:  TIMER[2]=RESET ;
  43:  TIMER[2]=START ;
  44:  TIMER[3]=RESET ;
  45:   ;
  46:  !PROCEED TO PICK ;
  47:  LBL[20] ;
  48:  IF DI[1]=ON AND DI[3]=ON AND DI[8]=ON,JMP LBL[25] ;
  49:  IF DI[29]=ON,JMP LBL[90] ;
  50:  JMP LBL[20] ;
  51:   ;
  52:  LBL[25] ;
  53:  WAIT DI[1]=ON AND DI[3]=ON AND DI[8]=ON    ;
  54:  TIMER[3]=START ;
  55:  R[5]=100    ;
  56:  OVERRIDE=R[5] ;
  57:J P[3:PICK APPROACH] 100% CNT70 ACC100    ;
  58:   ;
  59:J P[4:PICK] 100% CNT5 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  60:  PAYLOAD[4] ;
  61:  CALL CHK_PICK    ;
  62:  MONITOR Z_CHECH ;
  63:J P[5:PICK DEPART] 100% CNT50 ACC100 TA R[20]sec,DO[5]=PULSE,1.0sec    ;
  64:  DO[8]=PULSE,1.0sec ;
  65:  LBL[27] ;
  66:  CALL CHECKPICK    ;
  67:  IF DI[9]=OFF OR DI[11]=OFF,JMP LBL[27] ;
  68:   ;
  69:J P[7:PICK CLEAR] 100% CNT100 ACC100    ;
  70:  LBL[30:GOTO DROP POUNCE] ;
  71:J P[8:DROP POUNCE] 100% CNT100 ACC100 BREAK    ;
  72:  TIMER[3]=STOP ;
  73:  LBL[40:AT DROP POUNCE] ;
  74:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  75:  IF DI[7]=ON AND DI[2]=ON,JMP LBL[50] ;
  76:  IF DI[18]=ON,JMP LBL[60] ;
  77:  JMP LBL[40] ;
  78:   ;
  79:  LBL[50:MOVE DROP SNEAK] ;
  80:  TIMER[3]=START ;
  81:  OVERRIDE=R[5] ;
  82:J P[9:DROP SNEAK] 100% CNT100 ACC100 BREAK    ;
  83:  LBL[51:DROP OR C-P-S] ;
  84:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  85:  IF DI[18]=ON,JMP LBL[40] ;
  86:  JMP LBL[51] ;
  87:  JMP LBL[50] ;
  88:   ;
  89:  LBL[60:MOVE CLS-PRS-ACC] ;
  90:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  91:  PAUSE ;
  92:  JMP LBL[30] ;
  93:   ;
  94:  LBL[80:DROP ENABLED] ;
  95:  !PROCEED TO DROP ;
  96:  TIMER[3]=START ;
  97:  OVERRIDE=R[5] ;
  98:J P[10:DROP APPROACH] 100% CNT50 ACC100    ;
  99:  MONITOR END Z_CHECH ;
 100:J P[11:DROP] 100% CNT5 TB R[19]sec,CALL PARTDROP ACC100    ;
 101:  DO[6]=PULSE,1.0sec ;
 102:  PAYLOAD[3] ;
 103:  CALL CHK_DROP    ;
 104:   ;
 105:J P[12:DROP DEPART] 100% CNT100 ACC130 TA    .02sec,DO[7]=PULSE,1.0sec    ;
 106:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 107:  !GOTO PICK POUNCE ;
 108:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 109:  IF DI[29]=ON,JMP LBL[90] ;
 110:  JMP LBL[10] ;
 111:   ;
 112:  LBL[90:END OF CYCLE] ;
 113:  TIMER[1]=STOP ;
 114:  R[4]=TIMER[1]    ;
 115:J P[1:MIDDLE] 50% CNT100    ;
 116:  MOVE TO HOME    ;
 117:   ;
 118:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.456  mm,	Y =     -.007  mm,	Z =  -888.000  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2106.302  mm,	Y =  1362.141  mm,	Z =  -928.477  mm,
	W =   179.437 deg,	P =     -.014 deg,	R =   149.236 deg,
	E1=   134.950 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2649.496  mm,	Y =  3352.041  mm,	Z =  -984.309  mm,
	W =   179.051 deg,	P =     -.394 deg,	R =    90.807 deg,
	E1=   193.529 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2649.378  mm,	Y =  3352.076  mm,	Z = -1134.471  mm,
	W =   179.293 deg,	P =     1.582 deg,	R =    90.815 deg,
	E1=   193.526 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2649.496  mm,	Y =  3352.041  mm,	Z =  -943.669  mm,
	W =   179.051 deg,	P =     -.394 deg,	R =    90.807 deg,
	E1=   193.529 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2118.635  mm,	Y =  1651.958  mm,	Z =  -895.301  mm,
	W =   179.603 deg,	P =     -.202 deg,	R =   145.745 deg,
	E1=   138.431 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2080.603  mm,	Y = -1000.589  mm,	Z =  -899.641  mm,
	W =  -178.740 deg,	P =     -.667 deg,	R =  -154.533 deg,
	E1=    78.718 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2199.479  mm,	Y = -1696.309  mm,	Z =  -897.361  mm,
	W =  -178.183 deg,	P =    -1.288 deg,	R =  -138.892 deg,
	E1=    63.198 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2623.300  mm,	Y = -3237.957  mm,	Z =  -857.375  mm,
	W =   179.502 deg,	P =    -4.895 deg,	R =   -91.175 deg,
	E1=    16.041 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2624.349  mm,	Y = -3246.472  mm,	Z = -1021.482  mm,
	W =   179.500 deg,	P =    -4.891 deg,	R =   -91.176 deg,
	E1=    16.046 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2621.217  mm,	Y = -3235.235  mm,	Z =  -876.805  mm,
	W =   179.502 deg,	P =    -4.894 deg,	R =   -91.175 deg,
	E1=    16.041 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2052.742  mm,	Y =  -780.511  mm,	Z =  -903.600  mm,
	W =  -178.803 deg,	P =     -.439 deg,	R =  -159.593 deg,
	E1=    83.775 deg
};
/END
